Revert "[Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image...
authorJohn Ralls <jralls@ceridwen.us>
Mon, 7 Nov 2011 21:48:03 +0000 (13:48 -0800)
committerJohn Ralls <jralls@ceridwen.us>
Mon, 7 Nov 2011 21:57:10 +0000 (13:57 -0800)
This reverts commit 8216324e4b13f0349ed3c0f854d41e6b32d1f0cb.
and          commit 3243e6955cd4014345170fdd9246a13eacad86dd.

gtk/gtkdnd-quartz.c
gtk/gtkquartz.c

index 2f01c65375c71b9272264a5db326be9cb6540445..0653261c65268f66da46f2537d781e2c4a85230a 100644 (file)
@@ -1081,11 +1081,6 @@ gtk_drag_begin_idle (gpointer arg)
   point = [info->nsevent locationInWindow];
 
   drag_image = _gtk_quartz_create_image_from_pixbuf (info->icon_pixbuf);
-  if (drag_image == NULL)
-    {
-      g_object_unref (info->context);
-      return point;
-    }
 
   point.x -= info->hot_x;
   point.y -= info->hot_y;
index 3b9558d387ee6edc5c171f47469613eebf00bdc8..74570005cd4a093ed40aa0809cad8536efcb6680 100644 (file)
@@ -35,11 +35,9 @@ _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
   int rowstride, pixbuf_width, pixbuf_height;
   gboolean has_alpha;
   NSImage *nsimage;
-  NSSize nsimage_size;
 
   pixbuf_width = gdk_pixbuf_get_width (pixbuf);
   pixbuf_height = gdk_pixbuf_get_height (pixbuf);
-  g_return_val_if_fail (pixbuf_width == 0 && pixbuf_height == 0, NULL);
   rowstride = gdk_pixbuf_get_rowstride (pixbuf);
   has_alpha = gdk_pixbuf_get_has_alpha (pixbuf);
 
@@ -59,12 +57,6 @@ _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
   CGColorSpaceRelease (colorspace);
 
   nsimage = [[NSImage alloc] initWithSize:NSMakeSize (pixbuf_width, pixbuf_height)];
-  nsimage_size = [nsimage size];
-  if (size.width == 0.0 && size.height == 0.0)
-    {
-      [nsimage release];
-      g_return_val_if_fail (FALSE, NULL);
-    }
   [nsimage lockFocus];
 
   context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];